Conversation
yanthomasdev
left a comment
There was a problem hiding this comment.
Looks good to me, I have a small nit but not blocking.
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
|
@yanthomasdev I think this was not a GA problem, because the pattern is always the same - the last of 4 parallel machines hangs at teardown. This has been happening for a while now, but not on every run. If you have any other proposal on how to run tests, I would be glad to hear it |
…Gateway and setup tasks
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce Cypress CI hangs (especially around git-gateway setup/teardown) by adding diagnostics, tightening timeouts, and adjusting Cypress time/clock behavior.
Changes:
- Added CI logging and reduced the
execa()Cypress runner timeout. - Added request timeouts + retry adjustments for Netlify API calls used by the git-gateway Cypress plugin.
- Skipped
cy.clock()for git-gateway tests to avoid hangs during page load.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cypress/utils/steps.js | Refactors several Cypress command sequences; adds an eslint disable and changes some chained commands to repeated queries. |
| cypress/run.mjs | Adds fork/machine debug logging and changes Cypress runner timeout behavior. |
| cypress/plugins/gitGateway.js | Consolidates Netlify API calls into a timed fetch helper and adjusts deploy polling + teardown delete behavior. |
| cypress/e2e/common/spec_utils.js | Changes hook exports to functions, lowers task timeout, and conditionally skips cy.clock() for git-gateway. |
| cypress.config.ts | Removes/adjusts comments around retries/plugins configuration. |
| .github/workflows/nodejs.yml | Adds a clarifying comment for fork-only env usage. |
Comments suppressed due to low confidence (1)
cypress/run.mjs:25
- Manual sharding can break when
specs.length < machineCount:Math.floor(specs.length / machineCount)becomes 0, causing most machines to run 0 specs and the last machine to run everything. Consider usingMath.ceil(and clamping start/end) or guardingspecsPerMachineto be at least 1 to keep shards balanced.
if (isFork && machineIndex && machineCount) {
const specsPerMachine = Math.floor(specs.length / machineCount);
const start = (machineIndex - 1) * specsPerMachine;
const machineSpecs =
machineIndex === machineCount
? specs.slice(start)
: specs.slice(start, start + specsPerMachine);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ror handling in afterEach
… for improved clarity
yanthomasdev
left a comment
There was a problem hiding this comment.
I have one small comment but I think it's close to getting merged
cypress/plugins/gitGateway.js
Outdated
There was a problem hiding this comment.
Don't we want to fetch this with fetchWithTimeout too?
…tions for better traceability

Improve logging for various Cypress tasks and streamline API request handling. Adjust timeout settings to enhance test reliability and performance. This update addresses issues with task timeouts and logging verbosity, ensuring a more efficient testing process.